<?php
require_once '../requires.php';
session_start();

$type = $_GET['type'];
$api = ApiFac::getApi($type);

$api->setOauth();
$request_token = $api->getRequestToken();
$_SESSION['request_token'] = $request_token;

$redirect_url = $api->getAuthorizeURL($request_token['oauth_token']);
@header("Location: {$redirect_url}");
?>